CFLAGS=-Wall -Werror -I/home/Xiezongyi/libevent/include -I../include 

LDFLAGS=-L/home/Xiezongyi/libevent/lib -L/home/Xiezongyi/apue/lib

LIBS=-levent -levent_openssl -lssl -lcrypto -lsqlite3

CC=gcc

all:
	${CC} *.c -o server ${CFLAGS} ${LIBS} ${LDFLAGS}

run:
	./server -p 9999

install:
	openssl genrsa -out server.key
	openssl req -new -key server.key -out server.req
	openssl x509 -req -days 365 -in server.req -signkey server.key -out server.crt

uninstall:
	rm -rf server server.crt server.key server.req temperature.db

